/**
 * 
 */
package com.googlecode.pcapj.bridj;

import org.bridj.Pointer;
import org.bridj.StructObject;
import org.bridj.ann.Array;
import org.bridj.ann.Field;

/**
 * 
	struct sockaddr {
		sa_family_t	sa_family;     // address family 
		char		sa_data[14];   // actually longer; address value 
	};
 * 
 */
public class sockaddr extends StructObject {
    public sockaddr() { super(); }
    public sockaddr(Pointer<? extends StructObject> pointer) { super(pointer); }

//    /**
//     * @return
//     */
//    @Field(0) 
//    public byte sa_len() {
//            return this.io.getByteField(this, 0);
//    }
//    /**
//     * @param sa_len
//     * @return
//     */
//    @Field(0) 
//    public sockaddr sa_len(byte sa_len) {
//            this.io.setByteField(this, 0, sa_len);
//            return this;
//    }
    /**
     * @return
     */
    @Field(0) 
    public short sa_family() {
            return this.io.getShortField(this, 0);
    }
    @Field(0) 
    public sockaddr sa_family(short sa_family) {
            this.io.setShortField(this, 0, sa_family);
            return this;
    }
    /**
     * @return
     */
    @Array({14})
    @Field(1) 
    public Pointer<Byte> sa_data() {
            return this.io.getPointerField(this, 1);
    }
}
